package com.care.mall.server.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.care.mall.server.mapper.MallBrandMapper;
import com.care.mall.common.domain.MallBrand;
import com.care.mall.server.service.IMallBrandService;

/**
 * 商品品牌Service业务层处理
 *
 * @author 李光耀负责
 * @date 2024-03-27
 */
@Service
public class MallBrandServiceImpl implements IMallBrandService
{
    @Autowired
    private MallBrandMapper mallBrandMapper;

    /**
     * 查询商品品牌
     *
     * @param brandId 商品品牌主键
     * @return 商品品牌
     */
    @Override
    public MallBrand selectMallBrandByBrandId(Long brandId)
    {
        return mallBrandMapper.selectMallBrandByBrandId(brandId);
    }

    /**
     * 查询商品品牌列表
     *
     * @param mallBrand 商品品牌
     * @return 商品品牌
     */
    @Override
    public List<MallBrand> selectMallBrandList(MallBrand mallBrand)
    {
        return mallBrandMapper.selectMallBrandList(mallBrand);
    }

    /**
     * 新增商品品牌
     *
     * @param mallBrand 商品品牌
     * @return 结果
     */
    @Override
    public int insertMallBrand(MallBrand mallBrand)
    {
        return mallBrandMapper.insertMallBrand(mallBrand);
    }

    /**
     * 修改商品品牌
     *
     * @param mallBrand 商品品牌
     * @return 结果
     */
    @Override
    public int updateMallBrand(MallBrand mallBrand)
    {
        return mallBrandMapper.updateMallBrand(mallBrand);
    }

    /**
     * 批量删除商品品牌
     *
     * @param brandIds 需要删除的商品品牌主键
     * @return 结果
     */
    @Override
    public int deleteMallBrandByBrandIds(Long[] brandIds)
    {
        return mallBrandMapper.deleteMallBrandByBrandIds(brandIds);
    }

    /**
     * 删除商品品牌信息
     *
     * @param brandId 商品品牌主键
     * @return 结果
     */
    @Override
    public int deleteMallBrandByBrandId(Long brandId)
    {
        return mallBrandMapper.deleteMallBrandByBrandId(brandId);
    }
}
